import random

shop = random.randint(1, 3)  # 随机商品食品的种类
shop1 = random.randint(1, 3)  # 随机店铺附
shop2 = random.randint(1, 4)  # 订单客户地址
shop4 = random.randint(1, 7)  # 随机跑腿费的价钱
shop1 = int(shop1)  # 转换类型
dict_shop1 = {1: {"麻辣烫店": {1: "麻辣烫", 2: "麻辣拌", 3: "麻辣香锅"}}, 2: {"奶茶店": {1: "奶昔", 2: "珍珠奶茶", 3: "椰果奶茶"}},
              3: {"相爱一家锅": {1: "煲仔饭", 2: "香甜粥", 3: "黄焖鸡"}}}  # 里面的食品
dict_shop2 = {"客户地址": {1: "德玛西亚", 2: "诺克萨斯", 3: "扭曲丛林", 4: "比尔吉夫特"}}  # 订单上面的住址
dict_shop3 = {"现住地址": {1: "德玛西亚", 2: "诺克萨斯", 3: "扭曲丛林", 4: "比尔吉夫特"}}  # 客户实际地址
dict_shop4 = {"跑腿费": {1: 20, 2: 12, 3: 16, 4: 25, 5: 18, 6: 80, 7: 99}}
print(dict_shop3.values())
while True:
    shop3 = int(input("请输入现在地址:"))

    if shop1 == 1:
        if dict_shop2["客户地址"][shop2] == dict_shop3["现住地址"][shop3]:
            print("购买的商品为:", dict_shop1[shop1], "选择购买的食品为:", dict_shop1[shop1]["麻辣烫店"][shop])
            break
        else:
            print("客户地址:", dict_shop2["客户地址"][shop2], "---", "现住地址:", dict_shop3["现住地址"][shop3], "不一致，重新判断")
        continue
    elif shop1 == 2:
        if dict_shop2["客户地址"][shop2] == dict_shop3["现住地址"][shop3]:
            print(dict_shop1[shop1], "选择购买的食品为:", dict_shop1[shop1]["奶茶店"][shop])
            break
        else:
            print("客户地址:", dict_shop2["客户地址"][shop2], "---", "现住地址:", dict_shop3["现住地址"][shop3], "不一致，重新判断")
        continue
    elif shop1 == 3:
        if dict_shop2["客户地址"][shop2] == dict_shop3["现住地址"][shop3]:
            print(dict_shop1[shop1], "选择购买的食品为:", dict_shop1[shop1]["相爱一家锅"][shop])
            # print("客户地址:", dict_shop2["客户地址"][shop2], "---", "现住地址:", dict_shop3["现住地址"][shop3], "一致，外卖添加成功")
            break
        else:
            print("客户地址:", dict_shop2["客户地址"][shop2], "---", "现住地址:", dict_shop3["现住地址"][shop3], "不一致，重新判断")
        continue

print("客户地址:", dict_shop2["客户地址"][shop2], "---", "现住地址:", dict_shop3["现住地址"][shop3], "地址一致，外卖添加成功")
print("跑腿费为:", dict_shop4["跑腿费"][shop4])

